﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="reward.aspx.cs" Inherits="Torch.WL.Web.CleanChina.reward" %>

<%@ Register Src="~/UserControl/WebPager.ascx" TagName="Pager" TagPrefix="uc" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>金钻奖</title>
    <link rel="stylesheet" href="..\resources\css\style.css" />
    <link rel="stylesheet" href="..\resources\css\smoothness\jquery-ui-1.9.0.custom.min.css" />
    <script type="text/javascript" src="..\resources\Js\jquery-1.8.2.min.js"></script>
    <script type="text/javascript" src="..\resources\Js\jquery-ui-1.9.0.custom.min.js"></script>
    <script type="text/javascript" src="../DatePicker/WdatePicker.js"></script>
</head>
<body class="bodyDetail">
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div class="mainbody">
        <div class="headerIframe">
            <div class="pathIframe">
                展会管理 > 金钻奖
            </div>
            <div class="returnIframe">
                &nbsp;
            </div>
            <div class="titleIframe">
                &nbsp;
            </div>
            <div class="controlIframe">
                &nbsp;
            </div>
        </div>
        <div class="clear">
        </div>
        <div class="contentDetail">
            <div class="levelOneLine">
            </div>
            <div class="levelOneContent" style="height: 320px;">
                <span class="levelOneAll">
                    <asp:UpdatePanel runat="server" ID="upJzjList" UpdateMode="Conditional" ChildrenAsTriggers="true">
                        <ContentTemplate>
                            <table style="margin: 3px auto;">
                                <thead>
                                    <tr>
                                        <td style="width: 30px;">
                                            序号
                                        </td>
                                        <td style="width: 400px;">
                                            奖项
                                        </td>
                                        <td style="width: 200px;">
                                            获奖公司
                                        </td>
                                        <td style="width: 110px;">
                                            操作
                                        </td>
                                    </tr>
                                </thead>
                                <tbody>
                                    <asp:Repeater ID="rptJzj" runat="server" OnItemCommand="rptJzj_ItemCommand">
                                        <ItemTemplate>
                                            <tr>
                                                <td>
                                                    <%# Container.ItemIndex + 1%>
                                                </td>
                                                <td>
                                                    <asp:TextBox runat="server" ID="txtRewardName" Width="390px" Text='<%#Eval("rewardName")%>'></asp:TextBox>
                                                </td>
                                                <td style="text-align: left;">
                                                    <%#Eval("companyNames")%>
                                                </td>
                                                <td>
                                                    <asp:LinkButton ID="lbtnEdit" runat="server" CommandArgument='<%#Eval("rewardId") %>'
                                                        CommandName="Edit">修改</asp:LinkButton>|<asp:LinkButton ID="lbtnDelete" runat="server"
                                                            CommandArgument='<%#Eval("rewardId") %>' CommandName="Delete">删除</asp:LinkButton>|<asp:LinkButton
                                                                ID="lbtnSetReward" runat="server" CommandArgument='<%#Eval("rewardId") %>' CommandName="SetReward">设置奖项</asp:LinkButton>
                                                </td>
                                            </tr>
                                        </ItemTemplate>
                                        <AlternatingItemTemplate>
                                            <tr class="even">
                                                <td>
                                                    <%#Eval("rewardId")%>
                                                </td>
                                                <td>
                                                    <asp:TextBox runat="server" ID="txtRewardName" Width="390px" Text='<%#Eval("rewardName")%>'></asp:TextBox>
                                                </td>
                                                <td style="text-align: left;">
                                                    <%#Eval("companyNames")%>
                                                </td>
                                                <td>
                                                    <asp:LinkButton ID="lbtnEdit" runat="server" CommandArgument='<%#Eval("rewardId") %>'
                                                        CommandName="Edit">修改</asp:LinkButton>|<asp:LinkButton ID="lbtnDelete" runat="server"
                                                            CommandArgument='<%#Eval("rewardId") %>' CommandName="Delete">删除</asp:LinkButton>|<asp:LinkButton
                                                                ID="lbtnSetReward" runat="server" CommandArgument='<%#Eval("rewardId") %>' CommandName="SetReward">设置奖项</asp:LinkButton>
                                                </td>
                                            </tr>
                                        </AlternatingItemTemplate>
                                        <FooterTemplate>
                                            <tr>
                                                <td style="background-color: #e3e197;">
                                                </td>
                                                <td style="background-color: #e3e197;">
                                                    <asp:TextBox runat="server" ID="txtRewardName" Width="390px" Text=''></asp:TextBox>
                                                </td>
                                                <td style="text-align: left; background-color: #e3e197;">
                                                </td>
                                                <td style="background-color: #e3e197;">
                                                    <asp:LinkButton ID="lbtnAdd" runat="server" CommandName="Add">新增</asp:LinkButton>
                                                </td>
                                            </tr>
                                        </FooterTemplate>
                                    </asp:Repeater>
                                </tbody>
                            </table>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </span>
            </div>
        </div>
    </div>
    <div id="Jzj_dialog" title="展商选择" style="display: none;">
        <asp:UpdatePanel runat="server" ID="upJzjDetail" UpdateMode="Conditional" ChildrenAsTriggers="true">
            <ContentTemplate>
                <div class="pageDetail" style="width: 620px;">
                    <div class="footerDetail" style="margin-top: 0px; border-top: 0px solid white;">
                        <div class="footerDetailContent" style="left: 10px;">
                            已选择 <span style="color: Red;" runat="server" id="spHasZss">0</span> 家公司 <span class="buttons">
                            </span>
                        </div>
                        <div class="footerDetailContent" style="right: 10px;">
                            <span class="buttons">
                                <asp:LinkButton runat="server" ID="lbtnSaveSelect" OnClick="lbtnSaveSelect_Click"
                                    CssClass="positive" Style="float: right; width: 180px;"> <img src="..\resources\Images\apply2.png" alt="" />
                    &nbsp;我已选择完毕，保存 &nbsp;&nbsp;</asp:LinkButton>
                            </span>
                        </div>
                    </div>
                    <div class="clear">
                    </div>
                    <table style="margin: 3px auto;">
                        <thead>
                            <tr>
                                <td style="width: 120px;">
                                    公司Logo
                                </td>
                                <td style="width: 80px;">
                                    展位号
                                </td>
                                <td style="width: 100px;">
                                    公司名
                                </td>
                                <td style="width: 80px;">
                                    电话
                                </td>
                                <td style="width: 30;">
                                    操作
                                </td>
                            </tr>
                        </thead>
                        <tbody>
                            <asp:Repeater ID="rptHasSelectZs" runat="server" OnItemCommand="rptHasSelectZs_ItemCommand">
                                <ItemTemplate>
                                    <tr>
                                        <td style="text-align: center;">
                                            <%#Eval("Gslogo")%>
                                        </td>
                                        <td style="text-align: left;">
                                            <%#Eval("ZhanWeiH")%>
                                        </td>
                                        <td style="text-align: left;">
                                            <%#Eval("companyName")%>
                                        </td>
                                        <td style="text-align: left;">
                                            <%#Eval("companyTele")%>
                                        </td>
                                        <td style="width: 30px;">
                                            <asp:LinkButton ID="lbtnCancel" runat="server" CommandArgument='<%#Eval("rewardId") +"|"+Eval("companyId") %>'
                                                CommandName="Cancel">取消选择</asp:LinkButton>
                                        </td>
                                    </tr>
                                </ItemTemplate>
                                <AlternatingItemTemplate>
                                    <tr class="even">
                                        <td style="text-align: center;">
                                            <%#Eval("Gslogo")%>
                                        </td>
                                        <td style="text-align: left;">
                                            <%#Eval("ZhanWeiH")%>
                                        </td>
                                        <td style="text-align: left;">
                                            <%#Eval("companyName")%>
                                        </td>
                                        <td style="text-align: left;">
                                            <%#Eval("companyTele")%>
                                        </td>
                                        <td style="width: 30px;">
                                            <asp:LinkButton ID="lbtnCancel" runat="server" CommandArgument='<%#Eval("rewardId") +"|"+Eval("companyId") %>'
                                                CommandName="Cancel">取消选择</asp:LinkButton>
                                        </td>
                                    </tr>
                                </AlternatingItemTemplate>
                            </asp:Repeater>
                        </tbody>
                    </table>
                    <div class="searchPaneIframe">
                        <span class="searchPartIframe">公司名 ：<asp:TextBox runat="server" ID="txtGsmc" CssClass="normal"
                            MaxLength="100"></asp:TextBox>
                        </span>
                        <asp:ImageButton runat="server" ID="ibtnSearch" ImageUrl="..\resources\images\search.png"
                            CssClass="searchBtnIframe" OnClick="lbtnSearch_Click" />
                    </div>
                    <div class="clear">
                    </div>
                    <div class="levelOneContent" style="height: 320px;">
                        <span class="levelOneAll">
                            <table style="margin: 3px auto;">
                                <thead>
                                    <tr>
                                        <td style="width: 120px;">
                                            公司Logo
                                        </td>
                                        <td style="width: 80px;">
                                            展位号
                                        </td>
                                        <td style="width: 100px;">
                                            公司名
                                        </td>
                                        <td style="width: 80px;">
                                            电话
                                        </td>
                                        <td style="width: 30;">
                                            操作
                                        </td>
                                    </tr>
                                </thead>
                                <tbody>
                                    <asp:Repeater ID="rptUnSelectZs" runat="server" OnItemCommand="rptUnSelectZs_ItemCommand">
                                        <ItemTemplate>
                                            <tr>
                                                <td style="text-align: center;">
                                                    <%#Eval("Gslogo")%>
                                                </td>
                                                <td style="text-align: left;">
                                                    <%#Eval("ZhanWeiH")%>
                                                </td>
                                                <td style="text-align: left;">
                                                    <%#Eval("companyName")%>
                                                </td>
                                                <td style="text-align: left;">
                                                    <%#Eval("companyTele")%>
                                                </td>
                                                <td style="width: 30px;">
                                                    <asp:LinkButton ID="lbtnSelect" runat="server" CommandArgument='<%#Eval("companyId")+"|"+Eval("companyLogo")+"|"+Eval("ZhanWeiH")+"|"+Eval("companyName")+"|"+Eval("companyTele")%>'
                                                        CommandName="Select">选择</asp:LinkButton>
                                                </td>
                                            </tr>
                                        </ItemTemplate>
                                        <AlternatingItemTemplate>
                                            <tr class="even">
                                                <td style="text-align: center;">
                                                    <%# Eval("Gslogo")%>
                                                </td>
                                                <td style="text-align: left;">
                                                    <%#Eval("ZhanWeiH")%>
                                                </td>
                                                <td style="text-align: left;">
                                                    <%#Eval("companyName")%>
                                                </td>
                                                <td style="text-align: left;">
                                                    <%#Eval("companyTele")%>
                                                </td>
                                                <td style="width: 30px;">
                                                    <asp:LinkButton ID="lbtnSelect" runat="server" CommandArgument='<%#Eval("companyId")+"|"+Eval("companyLogo")+"|"+Eval("ZhanWeiH")+"|"+Eval("companyName")+"|"+Eval("companyTele")%>'
                                                        CommandName="Select">选择</asp:LinkButton>
                                                </td>
                                            </tr>
                                        </AlternatingItemTemplate>
                                    </asp:Repeater>
                                </tbody>
                            </table>
                        </span>
                    </div>
                    <div class="clear">
                    </div>
                </div>
                <div class="clear">
                </div>
                <asp:HiddenField runat="server" ID="hfJzjId" Value="" />
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    </form>
</body>
</html>
<script>
    function Jzj(operateType) {
        $("#Jzj_dialog").dialog({
            resizable: false,
            width: 660,
            height: 600,
            modal: true
        });
    }

    //表格 用于单偶行显示区分
    function tablecss(tableObjId) {
        var tables = document.getElementsByTagName("table");
        if (typeof tableObjId != 'object' && tableObjId != undefined && tableObjId != '') {
            tables = new Array();
            tables[0] = $("#" + tableObjId)[0];
        }

        for (var x = 0; x != tables.length; x++) {
            var table = tables[x];
            if (!table) { return; }
            if (table.id == 'ToolBar') { return; }

            var tbodies = table.getElementsByTagName("tbody");

            for (var h = 0; h < tbodies.length; h++) {
                var even = true;
                var trs = tbodies[h].getElementsByTagName("tr");

                for (var i = 0; i < trs.length; i++) {
                    trs[i].onmouseover = function () {
                        this.className += " ruled"; return false
                    }
                    trs[i].onmouseout = function () {
                        this.className = this.className.replace("ruled", ""); return false
                    }

                    if (even)
                        trs[i].className += " even";

                    even = !even;
                }
            }
        }
    }

    //window.onload = tablecss;
</script>
